public class P3_Ptry{
	public static void main(String args[])	{
		Line l1 = new Line(3, 3, 4, 4);
		System.out.println(l1.length());
	}
}

class Point{
	protected int x, y;
	Point(int a, int b){
		setPoint(a, b); System.out.println(this.x + "  " + this.y); 
	}
	public void setPoint(int a, int b) { x = a; y = b; }
	public int getx() { return x; }
	public int gety() { return y; }
}

class Line extends Point{
	protected int x, y, endx, endy;
	Line(int x1, int y1, int x2, int y2){
		//super(2,2);
		System.out.println(this.x + "  " + this.y);
		setLine(x1, y1, x2, y2);
		System.out.println(super.x + "  " + super.y);
		System.out.println(this.x + "  " + this.y);
	}

	public void setLine(int x1, int y1, int x2, int y2){
		x = x1; y = y1; endx = x2; endy = y2;
	}

	public int getx() { return x; }
	public int gety() { return y; }
	public int getendx() {return endx;}
	public int getendy() { return endy; }
	public double length(){
		return Math.sqrt((endx - x) * (endx - x) + (endy - y) * (endy - y));
	}
}